package com.suishoupai.xmb.service;

import com.suishoupai.xmb.dao.CutSearchMapper;
import com.suishoupai.xmb.entity.CutSearch;
import com.suishoupai.xmb.entity.Xiaoqu;
import com.suishoupai.xmb.utils.ParticipleUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by caojian on 2017/4/14.
 */
@Service
public class SearchService {
    @Autowired
    private CutSearchMapper cutSearchMapper;

    public List<CutSearch> searchGoodsAndSale(String name, long xiaoquId) {
        return cutSearchMapper.searchGoodsAndSale(ParticipleUtil.participle(name), xiaoquId);
    }

    public List<CutSearch> searchXiaoqu(String name) {
        return cutSearchMapper.searchXiaoqu(ParticipleUtil.participle(name));
    }
}
